package demo.thread;

/**
 * 精灵、守护线程
 * @author small瑞
 */
public class TreadDaemon extends Thread{
    private boolean isDaemon;

    public TreadDaemon(String name ,boolean isDaemon) {
        super(name);
        this.setDaemon(isDaemon);
    }

    @Override
    public void run() {
        for(int i = 0 ; i < 10000000 ; i++){
            System.out.println(this.getName()+":"+i);
        }
    }
}
